home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_libjpeg.idb / usr / freeware / catman / u_man / cat1 / jpegtran.Z / jpegtran
Encoding:
Text File  |  1999-01-26  |  12.9 KB  |  331 lines

  1.  
  2.  
  3.  
  4.      JJJJPPPPEEEEGGGGTTTTRRRRAAAANNNN((((1111))))       UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((3333    AAAAuuuugggguuuusssstttt 1111999999997777))))       JJJJPPPPEEEEGGGGTTTTRRRRAAAANNNN((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       jpegtran - lossless transformation of    JPEG files
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.       jjjjppppeeeeggggttttrrrraaaannnn [ _o_p_t_i_o_n_s ] [ _f_i_l_e_n_a_m_e ]
  13.  
  14.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.       jjjjppppeeeeggggttttrrrraaaannnn performs various useful transformations of JPEG
  16.       files.  It can translate the coded representation from one
  17.       variant of JPEG to another, for example from baseline    JPEG
  18.       to progressive JPEG or vice versa.  It can also perform some
  19.       rearrangements of the    image data, for    example    turning    an
  20.       image    from landscape to portrait format by rotation.
  21.  
  22.       jjjjppppeeeeggggttttrrrraaaannnn works by rearranging    the compressed data (DCT
  23.       coefficients), without ever fully decoding the image.
  24.       Therefore, its transformations are lossless:    there is no
  25.       image    degradation at all, which would    not be true if you
  26.       used ddddjjjjppppeeeegggg followed by ccccjjjjppppeeeegggg to accomplish the same
  27.       conversion.  But by the same token, jjjjppppeeeeggggttttrrrraaaannnn cannot perform
  28.       lossy    operations such    as changing the    image quality.
  29.  
  30.       jjjjppppeeeeggggttttrrrraaaannnn reads the named JPEG/JFIF file, or the standard
  31.       input    if no file is named, and produces a JPEG/JFIF file on
  32.       the standard output.
  33.  
  34.      OOOOPPPPTTTTIIIIOOOONNNNSSSS
  35.       All switch names may be abbreviated; for example, ----ooooppppttttiiiimmmmiiiizzzzeeee
  36.       may be written ----oooopppptttt or ----oooo.  Upper and    lower case are
  37.       equivalent.  British spellings are also accepted (e.g.,
  38.       ----ooooppppttttiiiimmmmiiiisssseeee), though for brevity these are not mentioned
  39.       below.
  40.  
  41.       To specify the coded JPEG representation used    in the output
  42.       file,    jjjjppppeeeeggggttttrrrraaaannnn accepts a subset of the switches recognized
  43.       by ccccjjjjppppeeeegggg:
  44.  
  45.       ----ooooppppttttiiiimmmmiiiizzzzeeee
  46.            Perform optimization of entropy encoding    parameters.
  47.  
  48.       ----pppprrrrooooggggrrrreeeessssssssiiiivvvveeee
  49.            Create progressive JPEG file.
  50.  
  51.       ----rrrreeeessssttttaaaarrrrtttt _N
  52.            Emit a JPEG restart marker every    N MCU rows, or every N
  53.            MCU blocks if "B" is attached to    the number.
  54.  
  55.       ----ssssccccaaaannnnssss _f_i_l_e
  56.            Use the scan script given in the    specified text file.
  57.  
  58.       See ccccjjjjppppeeeegggg(1) for more    details    about these switches.  If you
  59.       specify none of these    switches, you get a plain baseline-
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 12/16/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      JJJJPPPPEEEEGGGGTTTTRRRRAAAANNNN((((1111))))       UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((3333    AAAAuuuugggguuuusssstttt 1111999999997777))))       JJJJPPPPEEEEGGGGTTTTRRRRAAAANNNN((((1111))))
  71.  
  72.  
  73.  
  74.       JPEG output file.  The quality setting and so    forth are
  75.       determined by    the input file.
  76.  
  77.       The image can    be losslessly transformed by giving one    of
  78.       these    switches:
  79.  
  80.       ----fffflllliiiipppp    hhhhoooorrrriiiizzzzoooonnnnttttaaaallll
  81.            Mirror image horizontally (left-right).
  82.  
  83.       ----fffflllliiiipppp    vvvveeeerrrrttttiiiiccccaaaallll
  84.            Mirror image vertically (top-bottom).
  85.  
  86.       ----rrrroooottttaaaatttteeee 99990000
  87.            Rotate image 90 degrees clockwise.
  88.  
  89.       ----rrrroooottttaaaatttteeee 111188880000
  90.            Rotate image 180    degrees.
  91.  
  92.       ----rrrroooottttaaaatttteeee 222277770000
  93.            Rotate image 270    degrees    clockwise (or 90 ccw).
  94.  
  95.       ----ttttrrrraaaannnnssssppppoooosssseeee
  96.            Transpose image (across UL-to-LR    axis).
  97.  
  98.       ----ttttrrrraaaannnnssssvvvveeeerrrrsssseeee
  99.            Transverse transpose (across UR-to-LL axis).
  100.  
  101.       The transpose    transformation has no restrictions regarding
  102.       image    dimensions.  The other transformations operate rather
  103.       oddly    if the image dimensions    are not    a multiple of the iMCU
  104.       size (usually    8 or 16    pixels), because they can only
  105.       transform complete blocks of DCT coefficient data in the
  106.       desired way.
  107.  
  108.       jjjjppppeeeeggggttttrrrraaaannnn's default behavior when transforming    an odd-size
  109.       image    is designed to preserve    exact reversibility and
  110.       mathematical consistency of the transformation set.  As
  111.       stated, transpose is able to flip the    entire image area.
  112.       Horizontal mirroring leaves any partial iMCU column at the
  113.       right    edge untouched,    but is able to flip all    rows of    the
  114.       image.  Similarly, vertical mirroring    leaves any partial
  115.       iMCU row at the bottom edge untouched, but is    able to    flip
  116.       all columns.    The other transforms can be built up as
  117.       sequences of transpose and flip operations; for consistency,
  118.       their    actions    on edge    pixels are defined to be the same as
  119.       the end result of the    corresponding transpose-and-flip
  120.       sequence.
  121.  
  122.       For practical    use, you may prefer to discard any
  123.       untransformable edge pixels rather than having a strange-
  124.       looking strip    along the right    and/or bottom edges of a
  125.       transformed image.  To do this, add the ----ttttrrrriiiimmmm    switch:
  126.  
  127.  
  128.  
  129.      Page 2                        (printed 12/16/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      JJJJPPPPEEEEGGGGTTTTRRRRAAAANNNN((((1111))))       UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((3333    AAAAuuuugggguuuusssstttt 1111999999997777))))       JJJJPPPPEEEEGGGGTTTTRRRRAAAANNNN((((1111))))
  137.  
  138.  
  139.  
  140.       ----ttttrrrriiiimmmm
  141.            Drop non-transformable edge blocks.
  142.  
  143.       Obviously, a transformation with ----ttttrrrriiiimmmm is not    reversible, so
  144.       strictly speaking jjjjppppeeeeggggttttrrrraaaannnn with this switch is not lossless.
  145.       Also,    the expected mathematical equivalences between the
  146.       transformations no longer hold.  For example,    ----rrrrooootttt 222277770000 ----ttttrrrriiiimmmm
  147.       trims    only the bottom    edge, but ----rrrrooootttt 99990000 ----ttttrrrriiiimmmm    followed by
  148.       ----rrrrooootttt 111188880000 ----ttttrrrriiiimmmm trims both edges.
  149.  
  150.       Another not-strictly-lossless    transformation switch is:
  151.  
  152.       ----ggggrrrraaaayyyyssssccccaaaalllleeee
  153.            Force grayscale output.
  154.  
  155.       This option discards the chrominance channels    if the input
  156.       image    is YCbCr (ie, a    standard color JPEG), resulting    in a
  157.       grayscale JPEG file.    The luminance channel is preserved
  158.       exactly, so this is a    better method of reducing to grayscale
  159.       than decompression, conversion, and recompression.  This
  160.       switch is particularly handy for fixing a monochrome picture
  161.       that was mistakenly encoded as a color JPEG.    (In such a
  162.       case,    the space savings from getting rid of the near-empty
  163.       chroma channels won't    be large; but the decoding time    for a
  164.       grayscale JPEG is substantially less than that for a color
  165.       JPEG.)
  166.  
  167.       jjjjppppeeeeggggttttrrrraaaannnn also    recognizes these switches that control what to
  168.       do with "extra" markers, such    as comment blocks:
  169.  
  170.       ----ccccooooppppyyyy    nnnnoooonnnneeee
  171.            Copy no extra markers from source file.    This setting
  172.            suppresses all comments and other excess    baggage
  173.            present in the source file.
  174.  
  175.       ----ccccooooppppyyyy    ccccoooommmmmmmmeeeennnnttttssss
  176.            Copy only comment markers.  This    setting    copies
  177.            comments    from the source    file, but discards any other
  178.            inessential data.
  179.  
  180.       ----ccccooooppppyyyy    aaaallllllll
  181.            Copy all    extra markers.    This setting preserves
  182.            miscellaneous markers found in the source file, such as
  183.            JFIF thumbnails and Photoshop settings.    In some    files
  184.            these extra markers can be sizable.
  185.  
  186.       The default behavior is ----ccccooooppppyyyy    ccccoooommmmmmmmeeeennnnttttssss.  (Note: in IJG
  187.       releases v6 and v6a, jjjjppppeeeeggggttttrrrraaaannnn    always did the equivalent of
  188.       ----ccccooooppppyyyy    nnnnoooonnnneeee.)
  189.  
  190.       Additional switches recognized by jpegtran are:
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                        (printed 12/16/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      JJJJPPPPEEEEGGGGTTTTRRRRAAAANNNN((((1111))))       UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((3333    AAAAuuuugggguuuusssstttt 1111999999997777))))       JJJJPPPPEEEEGGGGTTTTRRRRAAAANNNN((((1111))))
  203.  
  204.  
  205.  
  206.       ----mmmmaaaaxxxxmmmmeeeemmmmoooorrrryyyy _N
  207.            Set limit for amount of memory to use in    processing
  208.            large images.  Value is in thousands of bytes, or
  209.            millions    of bytes if "M"    is attached to the number.
  210.            For example, ----mmmmaaaaxxxx 4444mmmm selects 4000000 bytes.  If more
  211.            space is    needed,    temporary files    will be    used.
  212.  
  213.       ----oooouuuuttttffffiiiilllleeee _n_a_m_e
  214.            Send output image to the    named file, not    to standard
  215.            output.
  216.  
  217.       ----vvvveeeerrrrbbbboooosssseeee
  218.            Enable debug printout.  More ----vvvv's give more output.
  219.            Also, version information is printed at startup.
  220.  
  221.       ----ddddeeeebbbbuuuugggg
  222.            Same as ----vvvveeeerrrrbbbboooosssseeee.
  223.  
  224.      EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  225.       This example converts    a baseline JPEG    file to    progressive
  226.       form:
  227.  
  228.            jjjjppppeeeeggggttttrrrraaaannnn    ----pppprrrrooooggggrrrreeeessssssssiiiivvvveeee _f_o_o._j_p_g >>>> _f_o_o_p_r_o_g._j_p_g
  229.  
  230.       This example rotates an image    90 degrees clockwise,
  231.       discarding any unrotatable edge pixels:
  232.  
  233.            jjjjppppeeeeggggttttrrrraaaannnn    ----rrrrooootttt 99990000    ----ttttrrrriiiimmmm _f_o_o._j_p_g >>>>    _f_o_o_9_0._j_p_g
  234.  
  235.      EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT
  236.       JJJJPPPPEEEEGGGGMMMMEEEEMMMM
  237.            If this environment variable is set, its    value is the
  238.            default memory limit.  The value    is specified as
  239.            described for the ----mmmmaaaaxxxxmmmmeeeemmmmoooorrrryyyy switch.  JJJJPPPPEEEEGGGGMMMMEEEEMMMM overrides
  240.            the default value specified when    the program was
  241.            compiled, and itself is overridden by an    explicit
  242.            ----mmmmaaaaxxxxmmmmeeeemmmmoooorrrryyyy.
  243.  
  244.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  245.       ccccjjjjppppeeeegggg(1), ddddjjjjppppeeeegggg(1), rrrrddddjjjjppppggggccccoooommmm(1), wwwwrrrrjjjjppppggggccccoooommmm(1)
  246.       Wallace, Gregory K.  "The JPEG Still Picture Compression
  247.       Standard", Communications of the ACM,    April 1991 (vol. 34,
  248.       no. 4), pp. 30-44.
  249.  
  250.      AAAAUUUUTTTTHHHHOOOORRRR
  251.       Independent JPEG Group
  252.  
  253.      BBBBUUUUGGGGSSSS
  254.       Arithmetic coding is not supported for legal reasons.
  255.  
  256.       The transform    options    can't transform    odd-size images
  257.       perfectly.  Use ----ttttrrrriiiimmmm    if you don't like the results without
  258.  
  259.  
  260.  
  261.      Page 4                        (printed 12/16/98)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      JJJJPPPPEEEEGGGGTTTTRRRRAAAANNNN((((1111))))       UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((3333    AAAAuuuugggguuuusssstttt 1111999999997777))))       JJJJPPPPEEEEGGGGTTTTRRRRAAAANNNN((((1111))))
  269.  
  270.  
  271.  
  272.       it.
  273.  
  274.       The entire image is read into    memory and then    written    out
  275.       again, even in cases where this isn't    really necessary.
  276.       Expect swapping on large images, especially when using the
  277.       more complex transform options.
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.      Page 5                        (printed 12/16/98)
  328.  
  329.  
  330.  
  331.